<?php

// +----------------------------------------------------------------------
// | ThinkAdmin
// +----------------------------------------------------------------------
// | 版权所有 2014~2021 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: https://thinkadmin.top
// +----------------------------------------------------------------------
// | 开源协议 ( https://mit-license.org )
// | 免费声明 ( https://thinkadmin.top/disclaimer )
// +----------------------------------------------------------------------
// | gitee 代码仓库：https://gitee.com/zoujingli/ThinkAdmin
// | github 代码仓库：https://github.com/zoujingli/ThinkAdmin
// +----------------------------------------------------------------------

namespace app\index\controller;

use think\admin\Controller;
use app\wechat\service\WechatService;


/**
 * Class Index
 * @package app\index\controller
 */
class Index extends Controller
{
    public function index()
    {
        return '第三方平台';
    }

    public  function register($appid = 'wx8b51df35b8477fe2')
    {
        $app = WechatService::WeOpenService();
        $redirectUri = urlencode(url('r', [], false, true));
        return   '<a href =' . $app->getCopyRegisterMiniUrl($appid, 1, $redirectUri) . '>xxxxxx</a>';
    }
}
